package com.py.pythink.vo;


import com.py.pythink.config.SystemConfig;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class R {
    private Integer code;
    private String msg;
    private Object data;

    public static R ok(){
        return new R(SystemConfig.R_OK,"ok",null);
    }
    public static R fail(){
        return new R(SystemConfig.R_FILE,"fail",null);
    }
    public static R fail(String msg){
        return new R(SystemConfig.R_FILE,msg,null);
    }
    public static R ok(Object data){
        return new R(SystemConfig.R_OK,"ok",data);
    }
}
